package com.atguigu.jxc.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ResultUtil {
    /**
     * 转换list到{rows: []}
     * @param list
     * @return
     */
    public static Map<String, Object> toRowsMap(List<? extends Object> list) {
        // 组装map
        Map<String, Object> map = new HashMap<>();
        map.put("rows", list);
        return map;
    }
}
